<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>背景图片位置</title>
    <style>
        .box1 {
            width: 300px;
            height: 300px;
            border: 1px solid #000;
            margin-bottom: 10px;
            background-image: url(../images/0.jpg);
            background-repeat: no-repeat;
            background-size: 50% auto;
            /* 背景位置 */
            background-position: 100px 150px;
        }

        .box2 {
            width: 300px;
            height: 300px;
            border: 1px solid #000;
            margin-bottom: 10px;
            background-image: url(../images/0.jpg);
            background-repeat: no-repeat;
            background-size: 50% auto;
            /* 背景位置 */
            background-position: center center;
        }

        .box3 {
            width: 300px;
            height: 300px;
            border: 1px solid #000;
            margin-bottom: 10px;
            background-image: url(../images/0.jpg);
            background-repeat: no-repeat;
            background-size: 50% auto;
            /* 背景位置 */
            background-position: center bottom;
        }

        .box4 {
            width: 300px;
            height: 300px;
            border: 1px solid #000;
            margin-bottom: 10px;
            background-image: url(../images/0.jpg);
            background-repeat: no-repeat;
            background-size: 50% auto;
            /* 背景位置 */
            background-position: right top;
        }

        .box5 {
            width: 300px;
            height: 300px;
            border: 1px solid #000;
            margin-bottom: 10px;
            background-image: url(../images/0.jpg);
            background-repeat: no-repeat;
            background-size: cover;
            background-position: center center;
        }

        .box6 {
            width: 300px;
            height: 300px;
            border: 1px solid #000;
            margin-bottom: 10px;
            background-image: url(../images/0.jpg);
            background-repeat: no-repeat;
            background-size: contain;
            background-position: center center;
        }
    </style>
</head>

<body>
    <div class="box1"></div>
    <div class="box2"></div>
    <div class="box3"></div>
    <div class="box4"></div>
    <div class="box5"></div>
    <div class="box6"></div>
</body>

</html>